#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;

int main()
{
    int a[11];
    for (int i = 0; i < 10; i++)
        cin >> a[i];
    int height;
    cin >> height;
    height += 30;
    int ans = 0;
    for (int i = 0; i < 10; i++)
        if (height >= a[i])
            ans++;
    cout << ans;
    return 0;
}
